import React, { Component } from "react";

// 引入仓库
import store from "./store";

class App extends Component {
  render() {
    return (
      <>
        <button onClick={() => store.dispatch({ type: "minus" })}>-</button>
        <span>{store.getState().count}</span>
        {/* 没有响应式的 */}
        <button onClick={() => store.dispatch({ type: "add", num: 3 })}>
          +
        </button>
      </>
    );
  }
}

export default App;
